<
















<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="date1"  value="{:input('date1')}" id="start">
            <input class="layui-input"  autocomplete="off" placeholder="截止日" name="date2"  value="{:input('date2')}" id="end">
            <input type="text" name="username"  value="{:input('username')}" placeholder="用户名"  class="layui-input">
            <input type="text" name="search_data"  placeholder="支持标题|描述" autocomplete="off" value="{:input('search_data')}"  class="layui-input">
            <div class="layui-input-inline">
                <select name="cate_id">
                    <option value="" >全部分类</option>
                    {volist name='cate' id='vo'}
                    <option value="{$vo['id']}" {notempty name="param['cate_id']"}{if condition="$param['cate_id'] eq $vo['id']"} selected="selected" {/if}{/notempty} >{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
            <div class="layui-input-inline">
                <select name="tags">
                    <option value="" >全部标签</option>
                    {volist name='tags' id='vo'}
                    <option value="{$vo['id']}" {notempty name="param['tags']"}{if condition="$param['tags'] eq $vo['id']"} selected="selected" {/if}{/notempty} >{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
            <button class="layui-btn"  id="search"  url="{:url('articlelist1')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>

        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="delAll(1)">通过审核</button>
        <button class="layui-btn layui-btn-danger" onclick="delAll(2)">拒绝审核</button>
        <span class="x-right" style="line-height:40px; ">共有数据：{$list.count} 条</span>
        <span class="x-right" style="line-height:40px;margin-right: 20px;">回帖数：{$list['reply']} </span>
    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>
            <th>
                <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>序号</th>
            <th>基础</th>
            <th>信息</th>
            <th>发布时间</th>
            <th>操作</th>


        </thead>
        {notempty name='list.list'}
        <tbody>
        {volist name='list.list' id='vo' key="k"}
        <tr>
            <td>
                <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
            </td>
            <td>{$k}</td>

            <td>
                <div><label>标题:</label><span>{$vo.name}</span></div>
                <div>  <label>内容:</label><span>{$vo.content}</span></div>

            </td>

            <td>
                <div><label>分类:</label><span>{$vo.name}</span></div>
                <div>  <label>回复人数:</label><span>{$vo.reply_count}</span></div>
                <div>  <label>发布会员:</label><span>{$vo.nickname}</span></div>

            </td>
            <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
            <td class="td-manage">
                <!--<a onclick="member_stop(this,'10001')" href="javascript:;"  title="启用">-->
                <!--<i class="layui-icon">&#xe601;</i>-->
                <!--</a>-->

                <ob_link><a title="查看详情"  href="{:url('articleEdit', array('id' => $vo['id']))}" >
                    <i class="layui-icon">&#xe705;</i>
                </a></ob_link>


            </td>
        </tr>
        {/volist}
        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>
    <div class="page">
        {notempty name='list'}   {$list.list->render()}{/notempty}
    </div>

</div>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

    function delAll (argument) {

        var data = tableCheck.getData();

        if(argument==1){
            var msg='通过';
        }else{
            var msg='拒绝';
        }
        layer.confirm('确认要'+msg+'吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            //监听提交
            var url="{:url('update_info')}";
            $.post(url,{ids:data,state:argument},function (d) {
                if(d.code==1){

                    window.location.reload();

                }
            },'json');



        });
    }
</script>

</body>

</html>


